<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="vue.js"></script>
</head>
<body>
<div id="root">
  <p v-for="(num,i) in arr" ref="one" :key="i">{{num}}</p>
</div>
</body>
<script>
  new Vue({
    el: '#root',
    data: {
      arr:[1,2,3,4,5,6,7,8,9]
    },
    mounted(){
      const {one} =this.$refs;
      one.forEach=function (el,index){
        if(index%2){
          el.style.color = "pink"
        }else el.style.color = "green"
      }
      //   one[1].style.color = "green";
    }
  })
</script>
</html>